#define admin_layout()
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台管理</title>
    <link rel="stylesheet" href="/assets/layui/css/layui.css">

</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        #include("_admin_header.html")
        #@admin_header()
    </div>

    #include("_admin_side.html")
    #@admin_side()

    <div class="layui-body">
        <div style="padding-left: 15px;">
            <div class="layui-tab" lay-filter="tab-body">
                <ul class="layui-tab-title">
                    <li class="layui-this" lay-id="index">首页</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">#@admin_body()</div>
                </div>
            </div>
        </div>
    </div>

    #include("_admin_footer.html")
    #@admin_footer()

</div>
<script src="/assets/layui/layui.js"></script>
#@admin_script?()
<script>
    layui.use('element', function(){
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(nav-side)', function(elem){
            console.log(elem.text());
            layer.msg(elem.text());
            element.tabAdd('tab-body', {
                title: elem.text(),
                content: '',
                id: 'tab-' + elem.text()
            });
        });

        //var layid = location.hash.replace(/^#/, '');
        //element.tabChange('tab-body', layid);
    });
</script>
</body>
</html>
#end